package com.rhtchr.angelbaby.customer;

import java.util.List;

import com.rhtchr.angelbaby.domain.CustomerInfo;
import com.rhtchr.util.GenericDaoHibernateImpl;

public class CustomerDao extends GenericDaoHibernateImpl<CustomerInfo, Integer> {

	public CustomerDao() {
		super(CustomerInfo.class);
	}

	public Integer save(CustomerInfo newInstance) {
		return super.save(newInstance);
	}

	public CustomerInfo find(Integer id) {
		return super.find(id);
	}

	@SuppressWarnings("unchecked")
	public List<CustomerInfo> findByExample(CustomerInfo customerInfo) {
		return (List<CustomerInfo>) getHibernateTemplate().findByExample(customerInfo);
	}

	@SuppressWarnings("unchecked")
	public List<CustomerInfo> find(String hql) {
		return (List<CustomerInfo>) getHibernateTemplate().find(hql);
	}

	@SuppressWarnings("unchecked")
	public List<CustomerInfo> find(String hql, Object param) {
		return (List<CustomerInfo>) getHibernateTemplate().find(hql, param);
	}

	public List<CustomerInfo> find(String hql, Object param1, Object param2) {
		return find(hql, new Object[] { param1, param2 });
	}

	public List<CustomerInfo> find(String hql, Object param1, Object param2, Object param3) {
		return find(hql, new Object[] { param1, param2, param3 });
	}

	public List<CustomerInfo> find(String hql, Object param1, Object param2, Object param3, Object param4) {
		return find(hql, new Object[] { param1, param2, param3, param4 });
	}

	@SuppressWarnings("unchecked")
	public List<CustomerInfo> find(String hql, Object[] params) {
		return (List<CustomerInfo>) getHibernateTemplate().find(hql, params);
	}

	public void update(CustomerInfo transientObject) {
		super.update(transientObject);
	}

	public void delete(CustomerInfo persistentObject) {
		super.delete(persistentObject);
	}

}
